using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Table
{
    /// <summary>
    /// <para>Truncate Table</para>
    /// <para>Removes all rows from a database table or feature class using truncate procedures in the database.</para>
    /// <para>使用数据库中的截断过程从数据库表或要素类中移除所有行。</para>
    /// </summary>    
    [DisplayName("Truncate Table")]
    public class TruncateTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TruncateTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The input database table or feature class that will be truncated.</para>
        /// <para>将被截断的输入数据库表或要素类。</para>
        /// </param>
        public TruncateTable(object _in_table)
        {
            this._in_table = _in_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Truncate Table";

        public override string CallName => "management.TruncateTable";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The input database table or feature class that will be truncated.</para>
        /// <para>将被截断的输入数据库表或要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Truncated Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Truncated Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public TruncateTable SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}